﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHook.Native;

namespace NHook
{
	public static class DebugEventExtensions
	{
		public static TDetail As<TDetail>(this DebugEvent debugEvent) where TDetail : Detail
		{
			var debugEventEx = debugEvent as DebugEventEx<TDetail>;
			if(debugEventEx == null)
				return default(TDetail);
			return debugEventEx.Details;
		}
	}
}
